package com.demo8.common.service.impl;

import com.demo8.basic.annotation.RateLimiter;
import com.demo8.basic.constant.CacheConstants;
import com.demo8.basic.enums.CaptchaEnum;
import com.demo8.basic.enums.LimitType;
import com.demo8.common.domain.CaptchaBodyVO;
import com.demo8.common.service.ICaptchaStrategyService;
import org.springframework.stereotype.Service;

@Service("email")
public class EmailCaptchaStrategyServiceImpl implements ICaptchaStrategyService {
    @RateLimiter(key =  CacheConstants.RATE_LIMIT_KEY+"email:", time = 60, count = 1, limitType = LimitType.IP)
    @Override
    public CaptchaBodyVO generateCaptcha(String target) {
        return null;
    }

    @Override
    public CaptchaEnum getType() {
        return CaptchaEnum.EMAIL;
    }
}
